<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .hiDiv {
            width: 100%;
            height: 100%;
            background-color: rgba(204, 204, 204, 0.5);
            position: absolute;
            left: 0px;
            top: 0px;
            visibility: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .inDiv {
            width: 50%;
            height: 50%;
            background-color: white;
            padding: 50px;
            margin: auto;
        }
    </style>
    <script src="empioyee.js"></script>
    <script src="emService.js"></script>

</head>
<body>
<table border="1" width="80%" style="border-collapse: collapse;background-color: springgreen;
text-align: center;line-height: 30px;margin: 50px auto auto;">
    <thead>
    <tr>
        <th>编号</th>
        <th>性别</th>
        <th>工资</th>
        <th>信号</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody id="data"></tbody>
    姓名：<input type="text" id="findName">
    <input type="button" value="查找" onclick="findByName();">
    <input type="button" value="增加" onclick="showAddDiv();">
    <input type="button" value="工资排序" onclick="forMoney();">
    <input type="button" value="编号排序" onclick="forCode();">
    <div class="hiDiv" id="showDiv">
        <div class="inDiv" id="addDiv">
            编号：<input type="text" id="codeInput" onblur="checkCode()"> <span id="codeSpan"></span> <br>
            姓名：<input type="text" id="nameInput" onblur="checkName()"> <span id="nameSpan"></span> <br>
            工资：<input type="text" id="countInput" onblur="checkCount()"><span id="countSpan"></span><br>
            性别：<input type="text" id="sexnput" onblur="checkSex()"><span id="sexSpan"></span><br>
            <input type="button" value="提交" onclick="sureAdd();">
            <input type="button" value="返回" onclick="closeDiv('showDiv');">
        </div>
    </div>
    <div class="hiDiv" id="updateDiv">
        <div class="inDiv" id="upDiv">
            编号： <span id="codeSetSpan"></span> <br>
            姓名： <span id="nameSetSpan"></span> <br>
            工资：<input type="text" id="countSetInput" onblur="checkCount()"> <span id="countSetSpan"></span><br>
            性别：<span id="sexSetSpan"></span><br>
            <input type="button" value="修改" onclick="sureUpdate();">
            <input type="button" value="返回" onclick="closeDiv('updateDiv');">
        </div>
    </div>

</table>
</body>
</html>